load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library")

oncall("fboss_agent_push")

cpp_library(
    name = "serializer",
    headers = [
        "Serializer.h",
    ],
    deps = [],
    exported_deps = [
        "//fboss/fsdb/if:fsdb_oper-cpp2-types",
        "//folly:dynamic",
        "//folly/io:iobuf",
        "//thrift/lib/cpp2/folly_dynamic:folly_dynamic",
        "//thrift/lib/cpp2/protocol:protocol",
        "//thrift/lib/cpp2/protocol/detail:protocol_methods",
        "//thrift/lib/cpp2/reflection:reflection",
    ],
)

cpp_library(
    name = "node_utils",
    headers = [
        "NodeUtils.h",
    ],
    exported_deps = [
        ":serializer",
        "//fatal:fatal",
        "//folly:conv",
        "//thrift/lib/cpp/util:enum_utils",
        "//thrift/lib/cpp2/reflection:reflection",
    ],
)

cpp_library(
    name = "nodes",
    headers = [
        "ThriftHybridNode-inl.h",
        "ThriftListNode-inl.h",
        "ThriftMapNode-inl.h",
        "ThriftPrimitiveNode-inl.h",
        "ThriftSetNode-inl.h",
        "ThriftStructNode-inl.h",
        "ThriftUnionNode-inl.h",
        "Traits.h",
        "Types.h",
    ],
    deps = [
    ],
    exported_deps = [
        ":node_utils",
        ":serializer",
        "//fatal:fatal",
        "//fboss/agent/state:nodebase",
        "//fboss/fsdb/if:fsdb_oper-cpp2-types",
        "//fboss/thrift_cow/visitors:visitors",
        "//folly:conv",
        "//folly:dynamic",
        "//folly:fbstring",
        "//folly/json:dynamic",
        "//thrift/lib/cpp2/folly_dynamic:folly_dynamic",
        "//thrift/lib/cpp2/protocol:protocol",
        "//thrift/lib/cpp2/protocol/detail:protocol_methods",
        "//thrift/lib/cpp2/reflection:reflection",
    ],
)
